package TwentyOne.Class.Define;

class Employee {

    private long empno;
    private String ename;
    private double salary;
    private double rate;

    public Employee() {
    }

    public Employee(long empno, String ename, double salary, double rate) {
        this.empno = empno;
        this.ename = ename;
        this.salary = salary;
        this.rate = rate;
    }

    public String getInfo() {
        return "编号：" + this.empno + "、姓名：" + this.ename + "、基本薪水：" + this.salary
                + "、薪水增长率：" + this.rate;
    }

    public double salaryIncValue() { //得到薪水增长额度
        return this.salary * this.rate;
    }

    public double salaryIncResult() {  //得到增长后的薪水
        this.salary = this.salary * (1 + this.rate);
        return salary;
    }

    public void setEmpno(long empno) {
        this.empno = empno;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public void setRate(double rate) {
        this.rate = rate;
    }

    public long getEmpno() {
        return this.empno;
    }

    public String getEname() {
        return this.ename;
    }

    public double getSalary() {
        return this.salary;
    }

    public double getRate() {
        return this.rate;
    }
}

public class a3_Employee {

    public static void main(String[] args) {
        Employee emp = new Employee(7369L, "史密斯", 3000.0, 0.3);
        System.out.println(emp.getInfo());
        System.out.println("工资调整额度" + emp.salaryIncValue());
        System.out.println("上调后的工资" + emp.salaryIncResult());
        System.out.println(emp.getInfo());
    }
}
